<html>
<head>
<meta charset=utf-8>
<script>
var d=document;
function getName()
{
//var t1=d.getElementsByName("textField");
var t1=d.getElementById("t1");
//alert("Привет, " + t1[0].value);
alert("Привет, " + t1.value);
}
</script>
</head>
<body>
<input type=text name="textField" id="t1" size=45>
</br>
</br>
</br>
<button type="submit" onClick="getName()">button</button>
</body>
</html>
